<?php
require_once ('../lib/config.php');
require_once ('../lib/facebook.php');
require_once ('../lib/friends.php');
require_once ('../lib/friend.php');
require_once ('../lib/test.php');
require_once ('../../simpletest/autorun.php');
require_once ('../lib/init.php');

class TestTemplate extends UnitTestCase {
    
    function setUp(){
//        global $login_button;
//        try{
//            $me = getOneself();
//        }catch(FacebookApiException $e){
//            print($login_button);
//            exit();
//        }
    }

    //refer to http://www.simpletest.org/en/unit_test_documentation.html
    function _testProcessMessageTwoWayMessage(){
        $friends = array();
        $data = array (
            0 =>
            array (
                'name' => 'threadQuery',
                'fql_result_set' => array (
                    0 => array (
                            'thread_id' => '1',
                            'recipients' => array (
                                0 => '1246727707',
                                1 => '2',
                            ),
                    ),
                    1 =>
                    array (
                            'thread_id' => '1',
                            'recipients' => array (
                                0 => '1246727707',
                                1 => '2',
                            ),
                    )
                )
            ),
            1 =>
            array (
                'name' => 'messageQuery',
                'fql_result_set' => array (
                    0 =>
                    array (
                            'author_id' => '1246727707',
                            'thread_id' => '1',
                    ),
                    1 =>
                    array (
                            'author_id' => '2',
                            'thread_id' => '1',
                    )
                )
            )
        );
        
        $threads = processResultSet("threadQuery", $data);
        $messages = processResultSet("messageQuery", $data);
        processMessages($friends, $threads, $messages);
        
        $this->assertNotNull($friends);
        $this->assertFalse(empty($friends));
        $this->assertTrue(count($friends) == 1);
        $this->assertTrue($friends['2']->processNumberOfTwoWayMessages() == 1);
              
    }
    function _testProcessMessageOneWayMessage(){
        $friends = array();
        $data = array (
            0 =>
            array (
                'name' => 'threadQuery',
                'fql_result_set' => array (
                    0 => array (
                            'thread_id' => '1',
                            'recipients' => array (
                                0 => '1246727707',
                                1 => '2',
                            ),
                    ),
                    1 =>
                    array (
                            'thread_id' => '1',
                            'recipients' => array (
                                0 => '1246727707',
                                1 => '2',
                            ),
                    )
                )
            ),
            1 =>
            array (
                'name' => 'messageQuery',
                'fql_result_set' => array (
                    0 =>
                    array (
                            'author_id' => '1246727707',
                            'thread_id' => '1',
                    )
                )
            )
        );
        
        $threads = processResultSet("threadQuery", $data);
        $messages = processResultSet("messageQuery", $data);
        processMessages($friends, $threads, $messages);
        
        $this->assertNotNull($friends);
        $this->assertFalse(empty($friends));
        $this->assertTrue(count($friends) == 1);
        $this->assertTrue($friends['2']->processNumberOfOneWayMessages() == 1);
              
    }    

    function _testProcessTwoWayMessageScenario1_I_sent_They_replied(){
        $friends = array();
        $data = array (
            0 =>
            array (
                'name' => 'threadQuery',
                'fql_result_set' => array (
                    0 => array (
                            'thread_id' => '1',
                            'recipients' => array (
                                0 => '1246727707',
                                1 => '2',
                                2 => '3'
                            ),
                    ),
                    1 =>
                    array (
                            'thread_id' => '1',
                            'recipients' => array (
                                0 => '1246727707',
                                1 => '2',
                                2 => '3'
                            ),
                    )
                )
            ),
            1 =>
            array (
                'name' => 'messageQuery',
                'fql_result_set' => array (
                    0 =>
                    array (
                            'author_id' => '1246727707',
                            'thread_id' => '1',
                    ),
                    array (
                            'author_id' => '2',
                            'thread_id' => '1',
                    )
                )
            )
        );
        
        $threads = processResultSet("threadQuery", $data);
        $messages = processResultSet("messageQuery", $data);
        processMessages($friends, $threads, $messages);
        
        $this->assertNotNull($friends);
        $this->assertFalse(empty($friends));
        $this->assertTrue(count($friends) == 2);
        $this->assertTrue($friends['2']->processNumberOfTwoWayMessages() == 1);
        $this->assertTrue($friends['3']->processNumberOfOneWayMessages() == 1);
              
    }  
    function _testProcessTwoWayMessageScenario_They_sent_I_replied(){
        $friends = array();
        $data = array (
            0 =>
            array (
                'name' => 'threadQuery',
                'fql_result_set' => array (
                    0 => array (
                            'thread_id' => '1',
                            'recipients' => array (
                                0 => '1',
                                1 => '1246727707',
                                2 => '2'
                            ),
                    ),
                    1 =>
                    array (
                            'thread_id' => '1',
                            'recipients' => array (
                                0 => '1',
                                1 => '1246727707',
                                2 => '2'
                            ),
                    )
                )
            ),
            1 =>
            array (
                'name' => 'messageQuery',
                'fql_result_set' => array (
                    0 =>
                    array (
                            'author_id' => '1',
                            'thread_id' => '1',
                    ),
                    array (
                            'author_id' => '1246727707',
                            'thread_id' => '1',
                    )
                )
            )
        );
        
        $threads = processResultSet("threadQuery", $data);
        $messages = processResultSet("messageQuery", $data);
        processMessages($friends, $threads, $messages);
        
        $this->assertNotNull($friends);
        $this->assertFalse(empty($friends));
        $this->assertTrue(count($friends) == 1);
        $this->assertTrue($friends['1']->processNumberOfTwoWayMessages() == 1);
              
    }
    function testProcessMessage(){ 
    
        $friends = array();

        $data = array (
          0 => 
          array (
            'name' => 'threadQuery',
            'fql_result_set' => 
            array (
              0 => 
              array (
                'thread_id' => '1351618049761',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '572356495',
                ),
              ),
              1 => 
              array (
                'thread_id' => '1351618049761',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '572356495',
                ),
              ),
              2 => 
              array (
                'thread_id' => '1614324210008',
                'recipients' => 
                array (
                  0 => '509836156',
                  1 => '1246727707',
                ),
              ),
              3 => 
              array (
                'thread_id' => '1614324210008',
                'recipients' => 
                array (
                  0 => '509836156',
                  1 => '1246727707',
                ),
              ),
              4 => 
              array (
                'thread_id' => '1399235676022',
                'recipients' => 
                array (
                  0 => '645061280',
                  1 => '1246727707',
                ),
              ),
              5 => 
              array (
                'thread_id' => '1399235676022',
                'recipients' => 
                array (
                  0 => '645061280',
                  1 => '1246727707',
                ),
              ),
              6 => 
              array (
                'thread_id' => '1721644049082',
                'recipients' => 
                array (
                  0 => '100001496104711',
                  1 => '1246727707',
                ),
              ),
              7 => 
              array (
                'thread_id' => '1721644049082',
                'recipients' => 
                array (
                  0 => '100001496104711',
                  1 => '1246727707',
                ),
              ),
              8 => 
              array (
                'thread_id' => '1599733147865',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '100000767659366',
                ),
              ),
              9 => 
              array (
                'thread_id' => '1599733147865',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '100000767659366',
                ),
              ),
              10 => 
              array (
                'thread_id' => '1710195441763',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '711806955',
                  2 => '550118413',
                ),
              ),
              11 => 
              array (
                'thread_id' => '1339201898882',
                'recipients' => 
                array (
                  0 => '509836156',
                  1 => '572356495',
                  2 => '720480184',
                  3 => '100000525262538',
                  4 => '100000416787478',
                  5 => '1246727707',
                ),
              ),
              12 => 
              array (
                'thread_id' => '1339201898882',
                'recipients' => 
                array (
                  0 => '509836156',
                  1 => '572356495',
                  2 => '720480184',
                  3 => '100000525262538',
                  4 => '100000416787478',
                  5 => '1246727707',
                ),
              ),
              13 => 
              array (
                'thread_id' => '1228240403872',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '100000416787478',
                ),
              ),
              14 => 
              array (
                'thread_id' => '1542584758672',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '100000767659366',
                ),
              ),
              15 => 
              array (
                'thread_id' => '1542584758672',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '100000767659366',
                ),
              ),
              16 => 
              array (
                'thread_id' => '1521212155045',
                'recipients' => 
                array (
                  0 => '612139051',
                  1 => '1246727707',
                ),
              ),
              17 => 
              array (
                'thread_id' => '1521212155045',
                'recipients' => 
                array (
                  0 => '612139051',
                  1 => '1246727707',
                ),
              ),
              18 => 
              array (
                'thread_id' => '1326745827230',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '645061280',
                ),
              ),
              19 => 
              array (
                'thread_id' => '1326745827230',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '645061280',
                ),
              ),
              20 => 
              array (
                'thread_id' => '1733956912825',
                'recipients' => 
                array (
                  0 => '1676325929',
                  1 => '1246727707',
                ),
              ),
              21 => 
              array (
                'thread_id' => '1733956912825',
                'recipients' => 
                array (
                  0 => '1676325929',
                  1 => '1246727707',
                ),
              ),
              22 => 
              array (
                'thread_id' => '1518063872599',
                'recipients' => 
                array (
                  0 => '720480184',
                  1 => '1246727707',
                ),
              ),
              23 => 
              array (
                'thread_id' => '1518063872599',
                'recipients' => 
                array (
                  0 => '720480184',
                  1 => '1246727707',
                ),
              ),
              24 => 
              array (
                'thread_id' => '1569070278129',
                'recipients' => 
                array (
                  0 => '732486215',
                  1 => '100000568852321',
                  2 => '534124579',
                  3 => '100000036440363',
                  4 => '100001753717079',
                  5 => '1382591304',
                  6 => '720480184',
                  7 => '100001442696712',
                  8 => '1676325929',
                  9 => '100000293254433',
                  10 => '15720738',
                  11 => '1468604886',
                  12 => '765455726',
                  13 => '1637340897',
                  14 => '612484233',
                  15 => '100000550522019',
                  16 => '1847145997',
                  17 => '639171815',
                  18 => '100000585892525',
                  19 => '645061280',
                  20 => '1246727707',
                ),
              ),
              25 => 
              array (
                'thread_id' => '1569070278129',
                'recipients' => 
                array (
                  0 => '732486215',
                  1 => '100000568852321',
                  2 => '534124579',
                  3 => '100000036440363',
                  4 => '100001753717079',
                  5 => '1382591304',
                  6 => '720480184',
                  7 => '100001442696712',
                  8 => '1676325929',
                  9 => '100000293254433',
                  10 => '15720738',
                  11 => '1468604886',
                  12 => '765455726',
                  13 => '1637340897',
                  14 => '612484233',
                  15 => '100000550522019',
                  16 => '1847145997',
                  17 => '639171815',
                  18 => '100000585892525',
                  19 => '645061280',
                  20 => '1246727707',
                ),
              ),
              26 => 
              array (
                'thread_id' => '1683455970087',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '711806955',
                ),
              ),
              27 => 
              array (
                'thread_id' => '1531860328873',
                'recipients' => 
                array (
                  0 => '100000525262538',
                  1 => '1246727707',
                ),
              ),
              28 => 
              array (
                'thread_id' => '1531860328873',
                'recipients' => 
                array (
                  0 => '100000525262538',
                  1 => '1246727707',
                ),
              ),
              29 => 
              array (
                'thread_id' => '1356257881067',
                'recipients' => 
                array (
                  0 => '612139051',
                  1 => '509836156',
                  2 => '1246727707',
                ),
              ),
              30 => 
              array (
                'thread_id' => '1356257881067',
                'recipients' => 
                array (
                  0 => '612139051',
                  1 => '509836156',
                  2 => '1246727707',
                ),
              ),
              31 => 
              array (
                'thread_id' => '1207711609566',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '711806955',
                ),
              ),
              32 => 
              array (
                'thread_id' => '1207711609566',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '711806955',
                ),
              ),
              33 => 
              array (
                'thread_id' => '1322458320183',
                'recipients' => 
                array (
                  0 => '643085324',
                  1 => '100000551597743',
                  2 => '720480184',
                  3 => '1188737971',
                  4 => '100001053337661',
                  5 => '1538647579',
                  6 => '1335904612',
                  7 => '1532680212',
                  8 => '100000323082418',
                  9 => '696331953',
                  10 => '100000453704812',
                  11 => '1529207292',
                  12 => '1249068510',
                  13 => '761896669',
                  14 => '1453512909',
                  15 => '1246727707',
                  16 => '100000085231370',
                  17 => '646499806',
                  18 => '100000703605045',
                  19 => '100000902824854',
                  20 => '711806955',
                ),
              ),
              34 => 
              array (
                'thread_id' => '1206945869760',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '100001297801606',
                ),
              ),
              35 => 
              array (
                'thread_id' => '1578567938416',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '100001753717079',
                ),
              ),
              36 => 
              array (
                'thread_id' => '286433329996',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '100000767659366',
                ),
              ),
              37 => 
              array (
                'thread_id' => '286433329996',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '100000767659366',
                ),
              ),
              38 => 
              array (
                'thread_id' => '1200552671159',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '520468704',
                ),
              ),
              39 => 
              array (
                'thread_id' => '1200552671159',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '520468704',
                ),
              ),
              40 => 
              array (
                'thread_id' => '1424687545957',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '100000545529457',
                ),
              ),
              41 => 
              array (
                'thread_id' => '1422404566377',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1847145997',
                ),
              ),
              42 => 
              array (
                'thread_id' => '1422404566377',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1847145997',
                ),
              ),
              43 => 
              array (
                'thread_id' => '1289782423698',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612139051',
                ),
              ),
              44 => 
              array (
                'thread_id' => '1289782423698',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612139051',
                ),
              ),
              45 => 
              array (
                'thread_id' => '1441723526489',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612139051',
                ),
              ),
              46 => 
              array (
                'thread_id' => '441537559764',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '100000767659366',
                ),
              ),
              47 => 
              array (
                'thread_id' => '441537559764',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '100000767659366',
                ),
              ),
              48 => 
              array (
                'thread_id' => '1632313725756',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1452136143',
                ),
              ),
              49 => 
              array (
                'thread_id' => '1632313725756',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1452136143',
                ),
              ),
              50 => 
              array (
                'thread_id' => '1412148140715',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '100000767659366',
                ),
              ),
              51 => 
              array (
                'thread_id' => '1412148140715',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '100000767659366',
                ),
              ),
              52 => 
              array (
                'thread_id' => '1610927795972',
                'recipients' => 
                array (
                  0 => '509836156',
                  1 => '612139051',
                  2 => '1246727707',
                ),
              ),
              53 => 
              array (
                'thread_id' => '1610927795972',
                'recipients' => 
                array (
                  0 => '509836156',
                  1 => '612139051',
                  2 => '1246727707',
                ),
              ),
              54 => 
              array (
                'thread_id' => '1582851454856',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612139051',
                ),
              ),
              55 => 
              array (
                'thread_id' => '1582851454856',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612139051',
                ),
              ),
              56 => 
              array (
                'thread_id' => '1500377786718',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612139051',
                ),
              ),
              57 => 
              array (
                'thread_id' => '1500377786718',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612139051',
                ),
              ),
              58 => 
              array (
                'thread_id' => '1590003472933',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612139051',
                ),
              ),
              59 => 
              array (
                'thread_id' => '1590003472933',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612139051',
                ),
              ),
              60 => 
              array (
                'thread_id' => '1572505590174',
                'recipients' => 
                array (
                  0 => '509836156',
                  1 => '509400009',
                  2 => '612139051',
                  3 => '1246727707',
                ),
              ),
              61 => 
              array (
                'thread_id' => '1572505590174',
                'recipients' => 
                array (
                  0 => '509836156',
                  1 => '509400009',
                  2 => '612139051',
                  3 => '1246727707',
                ),
              ),
              62 => 
              array (
                'thread_id' => '422288040138',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612139051',
                ),
              ),
              63 => 
              array (
                'thread_id' => '422288040138',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612139051',
                ),
              ),
              64 => 
              array (
                'thread_id' => '1567427350412',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612139051',
                ),
              ),
              65 => 
              array (
                'thread_id' => '1420217023945',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612139051',
                ),
              ),
              66 => 
              array (
                'thread_id' => '1557050645743',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612139051',
                ),
              ),
              67 => 
              array (
                'thread_id' => '1511497581046',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612139051',
                ),
              ),
              68 => 
              array (
                'thread_id' => '1429966589109',
                'recipients' => 
                array (
                  0 => '711806955',
                  1 => '1246727707',
                ),
              ),
              69 => 
              array (
                'thread_id' => '1429966589109',
                'recipients' => 
                array (
                  0 => '711806955',
                  1 => '1246727707',
                ),
              ),
              70 => 
              array (
                'thread_id' => '1545771654217',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1468604886',
                ),
              ),
              71 => 
              array (
                'thread_id' => '1545771654217',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1468604886',
                ),
              ),
              72 => 
              array (
                'thread_id' => '1560878579753',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '509836156',
                ),
              ),
              73 => 
              array (
                'thread_id' => '1560878579753',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '509836156',
                ),
              ),
              74 => 
              array (
                'thread_id' => '1549042847255',
                'recipients' => 
                array (
                  0 => '509836156',
                  1 => '612139051',
                  2 => '1246727707',
                ),
              ),
              75 => 
              array (
                'thread_id' => '1549042847255',
                'recipients' => 
                array (
                  0 => '509836156',
                  1 => '612139051',
                  2 => '1246727707',
                ),
              ),
              76 => 
              array (
                'thread_id' => '413957419420',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              77 => 
              array (
                'thread_id' => '413957419420',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              78 => 
              array (
                'thread_id' => '1343523268315',
                'recipients' => 
                array (
                  0 => '509836156',
                  1 => '612139051',
                  2 => '1246727707',
                ),
              ),
              79 => 
              array (
                'thread_id' => '1343523268315',
                'recipients' => 
                array (
                  0 => '509836156',
                  1 => '612139051',
                  2 => '1246727707',
                ),
              ),
              80 => 
              array (
                'thread_id' => '1398002563089',
                'recipients' => 
                array (
                  0 => '509836156',
                  1 => '1246727707',
                ),
              ),
              81 => 
              array (
                'thread_id' => '1398002563089',
                'recipients' => 
                array (
                  0 => '509836156',
                  1 => '1246727707',
                ),
              ),
              82 => 
              array (
                'thread_id' => '1254403892032',
                'recipients' => 
                array (
                  0 => '509836156',
                  1 => '612139051',
                  2 => '1246727707',
                ),
              ),
              83 => 
              array (
                'thread_id' => '1448314725377',
                'recipients' => 
                array (
                  0 => '509836156',
                ),
              ),
              84 => 
              array (
                'thread_id' => '1324113382098',
                'recipients' => 
                array (
                  0 => '509836156',
                ),
              ),
              85 => 
              array (
                'thread_id' => '1127639927333',
                'recipients' => 
                array (
                  0 => '509836156',
                ),
              ),
              86 => 
              array (
                'thread_id' => '1414540530943',
                'recipients' => 
                array (
                  0 => '509836156',
                ),
              ),
              87 => 
              array (
                'thread_id' => '1468769399561',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '509836156',
                  2 => '612139051',
                ),
              ),
              88 => 
              array (
                'thread_id' => '1239722035772',
                'recipients' => 
                array (
                  0 => '509836156',
                ),
              ),
              89 => 
              array (
                'thread_id' => '1357706829190',
                'recipients' => 
                array (
                  0 => '509836156',
                ),
              ),
              90 => 
              array (
                'thread_id' => '1189545308025',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              91 => 
              array (
                'thread_id' => '1284383402716',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              92 => 
              array (
                'thread_id' => '1280504645836',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              93 => 
              array (
                'thread_id' => '454446140723',
                'recipients' => 
                array (
                  0 => '1559108118',
                  1 => '1246727707',
                ),
              ),
              94 => 
              array (
                'thread_id' => '1114676446575',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              95 => 
              array (
                'thread_id' => '1300052934883',
                'recipients' => 
                array (
                  0 => '555926326',
                  1 => '1246727707',
                  2 => '711806955',
                  3 => '612139051',
                  4 => '509836156',
                  5 => '1034778664',
                  6 => '550118413',
                ),
              ),
              96 => 
              array (
                'thread_id' => '1094255536862',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1034778664',
                  2 => '612139051',
                  3 => '711806955',
                  4 => '555926326',
                  5 => '509836156',
                  6 => '550118413',
                ),
              ),
              97 => 
              array (
                'thread_id' => '250370109045',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              98 => 
              array (
                'thread_id' => '1167040419799',
                'recipients' => 
                array (
                  0 => '711806955',
                  1 => '1559108118',
                  2 => '1246727707',
                  3 => '612139051',
                  4 => '550118413',
                  5 => '555926326',
                  6 => '509836156',
                ),
              ),
              99 => 
              array (
                'thread_id' => '1062972870454',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '720480184',
                ),
              ),
              100 => 
              array (
                'thread_id' => '1089848466347',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '509836156',
                ),
              ),
              101 => 
              array (
                'thread_id' => '1091725152502',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              102 => 
              array (
                'thread_id' => '1063589766385',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              103 => 
              array (
                'thread_id' => '1219277295883',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '509836156',
                ),
              ),
              104 => 
              array (
                'thread_id' => '1261304222131',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              105 => 
              array (
                'thread_id' => '1199035172417',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              106 => 
              array (
                'thread_id' => '1238485635522',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              107 => 
              array (
                'thread_id' => '1078527742224',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              108 => 
              array (
                'thread_id' => '1233476191867',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              109 => 
              array (
                'thread_id' => '1252163297709',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              110 => 
              array (
                'thread_id' => '1235382361095',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              111 => 
              array (
                'thread_id' => '1240976219280',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1559108118',
                ),
              ),
              112 => 
              array (
                'thread_id' => '1186989047957',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612139051',
                ),
              ),
              113 => 
              array (
                'thread_id' => '1050028666290',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '509836156',
                  2 => '1559108118',
                  3 => '612139051',
                ),
              ),
              114 => 
              array (
                'thread_id' => '1219269756528',
                'recipients' => 
                array (
                  0 => '612139051',
                  1 => '1246727707',
                ),
              ),
              115 => 
              array (
                'thread_id' => '1187011368126',
                'recipients' => 
                array (
                  0 => '1637340897',
                  1 => '1246727707',
                ),
              ),
              116 => 
              array (
                'thread_id' => '1259560128288',
                'recipients' => 
                array (
                  0 => '1559108118',
                  1 => '509836156',
                  2 => '1246727707',
                  3 => '612139051',
                ),
              ),
              117 => 
              array (
                'thread_id' => '1251447564264',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '1452136143',
                ),
              ),
              118 => 
              array (
                'thread_id' => '1163314797505',
                'recipients' => 
                array (
                  0 => '1246727707',
                  1 => '612484233',
                ),
              ),
              119 => 
              array (
                'thread_id' => '1034516795710',
                'recipients' => 
                array (
                  0 => '1356805212',
                  1 => '1246727707',
                ),
              ),
              120 => 
              array (
                'thread_id' => '1727701392559',
                'recipients' => 
                array (
                  0 => '711806955',
                  1 => '1436029649',
                  2 => '1382591304',
                  3 => '1468604886',
                  4 => '1128757552',
                  5 => '1847145997',
                  6 => '100000526102422',
                  7 => '1452136143',
                  8 => '1281934594',
                  9 => '550118413',
                  10 => '855739608',
                  11 => '1246727707',
                ),
              ),
              121 => 
              array (
                'thread_id' => '1564191518030',
                'recipients' => 
                array (
                  0 => '612139051',
                  1 => '1246727707',
                ),
              ),
              122 => 
              array (
                'thread_id' => '1519478704130',
                'recipients' => 
                array (
                  0 => '612139051',
                  1 => '1246727707',
                ),
              ),
              123 => 
              array (
                'thread_id' => '1634941589270',
                'recipients' => 
                array (
                  0 => '612139051',
                  1 => '509836156',
                  2 => '1246727707',
                ),
              ),
              124 => 
              array (
                'thread_id' => '1565263063564',
                'recipients' => 
                array (
                  0 => '1382591304',
                  1 => '1246727707',
                ),
              ),
              125 => 
              array (
                'thread_id' => '1312736919046',
                'recipients' => 
                array (
                  0 => '100000416787478',
                  1 => '1246727707',
                ),
              ),
              126 => 
              array (
                'thread_id' => '1554170048764',
                'recipients' => 
                array (
                  0 => '1452136143',
                  1 => '1246727707',
                ),
              ),
              127 => 
              array (
                'thread_id' => '1624223766974',
                'recipients' => 
                array (
                  0 => '1452136143',
                  1 => '1246727707',
                ),
              ),
              128 => 
              array (
                'thread_id' => '1478420292862',
                'recipients' => 
                array (
                  0 => '1676325929',
                  1 => '1246727707',
                ),
              ),
              129 => 
              array (
                'thread_id' => '1178271072993',
                'recipients' => 
                array (
                  0 => '509836156',
                  1 => '612139051',
                  2 => '1246727707',
                ),
              ),
            ),
          ),
          1 => 
          array (
            'name' => 'messageQuery',
            'fql_result_set' => 
            array (
              0 => 
              array (
                'author_id' => '572356495',
                'thread_id' => '1351618049761',
              ),
              1 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1351618049761',
              ),
              2 => 
              array (
                'author_id' => '572356495',
                'thread_id' => '1351618049761',
              ),
              3 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1351618049761',
              ),
              4 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1614324210008',
              ),
              5 => 
              array (
                'author_id' => '509836156',
                'thread_id' => '1614324210008',
              ),
              6 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1399235676022',
              ),
              7 => 
              array (
                'author_id' => '645061280',
                'thread_id' => '1399235676022',
              ),
              8 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1399235676022',
              ),
              9 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1721644049082',
              ),
              10 => 
              array (
                'author_id' => '100001496104711',
                'thread_id' => '1721644049082',
              ),
              11 => 
              array (
                'author_id' => '100000767659366',
                'thread_id' => '1599733147865',
              ),
              12 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1599733147865',
              ),
              13 => 
              array (
                'author_id' => '100000767659366',
                'thread_id' => '1599733147865',
              ),
              14 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1599733147865',
              ),
              15 => 
              array (
                'author_id' => '100000767659366',
                'thread_id' => '1599733147865',
              ),
              16 => 
              array (
                'author_id' => '550118413',
                'thread_id' => '1710195441763',
              ),
              17 => 
              array (
                'author_id' => '711806955',
                'thread_id' => '1710195441763',
              ),
              18 => 
              array (
                'author_id' => '711806955',
                'thread_id' => '1710195441763',
              ),
              19 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1339201898882',
              ),
              20 => 
              array (
                'author_id' => '100000525262538',
                'thread_id' => '1339201898882',
              ),
              21 => 
              array (
                'author_id' => '509836156',
                'thread_id' => '1339201898882',
              ),
              22 => 
              array (
                'author_id' => '100000416787478',
                'thread_id' => '1228240403872',
              ),
              23 => 
              array (
                'author_id' => '100000767659366',
                'thread_id' => '1542584758672',
              ),
              24 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1542584758672',
              ),
              25 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1521212155045',
              ),
              26 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1521212155045',
              ),
              27 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1521212155045',
              ),
              28 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1521212155045',
              ),
              29 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1521212155045',
              ),
              30 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1521212155045',
              ),
              31 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1521212155045',
              ),
              32 => 
              array (
                'author_id' => '645061280',
                'thread_id' => '1326745827230',
              ),
              33 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1326745827230',
              ),
              34 => 
              array (
                'author_id' => '645061280',
                'thread_id' => '1326745827230',
              ),
              35 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1733956912825',
              ),
              36 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1518063872599',
              ),
              37 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1569070278129',
              ),
              38 => 
              array (
                'author_id' => '1676325929',
                'thread_id' => '1569070278129',
              ),
              39 => 
              array (
                'author_id' => '720480184',
                'thread_id' => '1569070278129',
              ),
              40 => 
              array (
                'author_id' => '711806955',
                'thread_id' => '1683455970087',
              ),
              41 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1531860328873',
              ),
              42 => 
              array (
                'author_id' => '100000525262538',
                'thread_id' => '1531860328873',
              ),
              43 => 
              array (
                'author_id' => '100000525262538',
                'thread_id' => '1531860328873',
              ),
              44 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1531860328873',
              ),
              45 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1356257881067',
              ),
              46 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1356257881067',
              ),
              47 => 
              array (
                'author_id' => '509836156',
                'thread_id' => '1356257881067',
              ),
              48 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1356257881067',
              ),
              49 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1356257881067',
              ),
              50 => 
              array (
                'author_id' => '509836156',
                'thread_id' => '1356257881067',
              ),
              51 => 
              array (
                'author_id' => '711806955',
                'thread_id' => '1207711609566',
              ),
              52 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1207711609566',
              ),
              53 => 
              array (
                'author_id' => '711806955',
                'thread_id' => '1322458320183',
              ),
              54 => 
              array (
                'author_id' => '100001297801606',
                'thread_id' => '1206945869760',
              ),
              55 => 
              array (
                'author_id' => '100001753717079',
                'thread_id' => '1578567938416',
              ),
              56 => 
              array (
                'author_id' => '100000767659366',
                'thread_id' => '286433329996',
              ),
              57 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '286433329996',
              ),
              58 => 
              array (
                'author_id' => '520468704',
                'thread_id' => '1200552671159',
              ),
              59 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1200552671159',
              ),
              60 => 
              array (
                'author_id' => '520468704',
                'thread_id' => '1200552671159',
              ),
              61 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1200552671159',
              ),
              62 => 
              array (
                'author_id' => '100000545529457',
                'thread_id' => '1424687545957',
              ),
              63 => 
              array (
                'author_id' => '1847145997',
                'thread_id' => '1422404566377',
              ),
              64 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1422404566377',
              ),
              65 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1289782423698',
              ),
              66 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1289782423698',
              ),
              67 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1289782423698',
              ),
              68 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1289782423698',
              ),
              69 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1289782423698',
              ),
              70 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1289782423698',
              ),
              71 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1289782423698',
              ),
              72 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1289782423698',
              ),
              73 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1289782423698',
              ),
              74 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1289782423698',
              ),
              75 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1289782423698',
              ),
              76 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1289782423698',
              ),
              77 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1289782423698',
              ),
              78 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1441723526489',
              ),
              79 => 
              array (
                'author_id' => '100000767659366',
                'thread_id' => '441537559764',
              ),
              80 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '441537559764',
              ),
              81 => 
              array (
                'author_id' => '1452136143',
                'thread_id' => '1632313725756',
              ),
              82 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1632313725756',
              ),
              83 => 
              array (
                'author_id' => '100000767659366',
                'thread_id' => '1412148140715',
              ),
              84 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1412148140715',
              ),
              85 => 
              array (
                'author_id' => '100000767659366',
                'thread_id' => '1412148140715',
              ),
              86 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1412148140715',
              ),
              87 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1610927795972',
              ),
              88 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1610927795972',
              ),
              89 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1610927795972',
              ),
              90 => 
              array (
                'author_id' => '509836156',
                'thread_id' => '1610927795972',
              ),
              91 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1582851454856',
              ),
              92 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1582851454856',
              ),
              93 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1582851454856',
              ),
              94 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1582851454856',
              ),
              95 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1582851454856',
              ),
              96 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1582851454856',
              ),
              97 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1582851454856',
              ),
              98 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1582851454856',
              ),
              99 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1500377786718',
              ),
              100 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1500377786718',
              ),
              101 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1500377786718',
              ),
              102 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1500377786718',
              ),
              103 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1590003472933',
              ),
              104 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1590003472933',
              ),
              105 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1572505590174',
              ),
              106 => 
              array (
                'author_id' => '509836156',
                'thread_id' => '1572505590174',
              ),
              107 => 
              array (
                'author_id' => '509400009',
                'thread_id' => '1572505590174',
              ),
              108 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '422288040138',
              ),
              109 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '422288040138',
              ),
              110 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1567427350412',
              ),
              111 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1420217023945',
              ),
              112 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1557050645743',
              ),
              113 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1511497581046',
              ),
              114 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1429966589109',
              ),
              115 => 
              array (
                'author_id' => '711806955',
                'thread_id' => '1429966589109',
              ),
              116 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1429966589109',
              ),
              117 => 
              array (
                'author_id' => '711806955',
                'thread_id' => '1429966589109',
              ),
              118 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1429966589109',
              ),
              119 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1429966589109',
              ),
              120 => 
              array (
                'author_id' => '711806955',
                'thread_id' => '1429966589109',
              ),
              121 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1429966589109',
              ),
              122 => 
              array (
                'author_id' => '1468604886',
                'thread_id' => '1545771654217',
              ),
              123 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1545771654217',
              ),
              124 => 
              array (
                'author_id' => '509836156',
                'thread_id' => '1560878579753',
              ),
              125 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1560878579753',
              ),
              126 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1560878579753',
              ),
              127 => 
              array (
                'author_id' => '509836156',
                'thread_id' => '1560878579753',
              ),
              128 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1560878579753',
              ),
              129 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1560878579753',
              ),
              130 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1549042847255',
              ),
              131 => 
              array (
                'author_id' => '509836156',
                'thread_id' => '1549042847255',
              ),
              132 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1549042847255',
              ),
              133 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1549042847255',
              ),
              134 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1549042847255',
              ),
              135 => 
              array (
                'author_id' => '1559108118',
                'thread_id' => '413957419420',
              ),
              136 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '413957419420',
              ),
              137 => 
              array (
                'author_id' => '1559108118',
                'thread_id' => '413957419420',
              ),
              138 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '413957419420',
              ),
              139 => 
              array (
                'author_id' => '1559108118',
                'thread_id' => '413957419420',
              ),
              140 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '413957419420',
              ),
              141 => 
              array (
                'author_id' => '1559108118',
                'thread_id' => '413957419420',
              ),
              142 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1343523268315',
              ),
              143 => 
              array (
                'author_id' => '509836156',
                'thread_id' => '1343523268315',
              ),
              144 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1343523268315',
              ),
              145 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1343523268315',
              ),
              146 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1343523268315',
              ),
              147 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1343523268315',
              ),
              148 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1343523268315',
              ),
              149 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1343523268315',
              ),
              150 => 
              array (
                'author_id' => '509836156',
                'thread_id' => '1343523268315',
              ),
              151 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1343523268315',
              ),
              152 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1343523268315',
              ),
              153 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1343523268315',
              ),
              154 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1343523268315',
              ),
              155 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1343523268315',
              ),
              156 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1343523268315',
              ),
              157 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1343523268315',
              ),
              158 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1343523268315',
              ),
              159 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1343523268315',
              ),
              160 => 
              array (
                'author_id' => '509836156',
                'thread_id' => '1343523268315',
              ),
              161 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1343523268315',
              ),
              162 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1343523268315',
              ),
              163 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1343523268315',
              ),
              164 => 
              array (
                'author_id' => '509836156',
                'thread_id' => '1343523268315',
              ),
              165 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1343523268315',
              ),
              166 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1343523268315',
              ),
              167 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1343523268315',
              ),
              168 => 
              array (
                'author_id' => '509836156',
                'thread_id' => '1343523268315',
              ),
              169 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1343523268315',
              ),
              170 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1343523268315',
              ),
              171 => 
              array (
                'author_id' => '612139051',
                'thread_id' => '1343523268315',
              ),
              172 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1398002563089',
              ),
              173 => 
              array (
                'author_id' => '509836156',
                'thread_id' => '1398002563089',
              ),
              174 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1398002563089',
              ),
              175 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1727701392559',
              ),
              176 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1564191518030',
              ),
              177 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1519478704130',
              ),
              178 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1634941589270',
              ),
              179 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1565263063564',
              ),
              180 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1312736919046',
              ),
              181 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1554170048764',
              ),
              182 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1624223766974',
              ),
              183 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1478420292862',
              ),
              184 => 
              array (
                'author_id' => '1246727707',
                'thread_id' => '1178271072993',
              ),
            ),
          ),
        );
        
        $threads = processResultSet("threadQuery", $data);
        $messages = processResultSet("messageQuery", $data);
        processMessages($friends, $threads, $messages);

        //check if response is null
        $this->assertNotNull($friends);
        
        //check if response is an array
        $this->assertTrue(is_array($friends));
        
//        print_r($friends);
    }
}
?>
